<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>装机方案-方案搜索</title>
		<#include "/WEB-INF/ftl/user/include.ftl" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/pager.css" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/scheme.css" />
		<link type="text/css" rel="stylesheet" href="${base}/css/user/scheme_search.css" />
		<script type="text/javascript" src="${base}/js/user/pager.js"></script>
		<script type="text/javascript" src="${base}/js/user/scheme_search.js"></script>
	</head>
	<body>
		<#include "/WEB-INF/ftl/user/header.ftl" />
		<div class="navigation">
			<a href="${base}/schemeSearch.do">装机方案</a>&nbsp;&gt;
			方案搜索
		</div>
		<div class="wrapper">
			<div class="tab">
				<a href="javascript:void(0);" class="selected">方案搜索</a>
				<a href="${base}/schemeRank.do">方案排行</a>
			</div>
			<div class="side">
				<div class="filter">
					<h2 class="filter-hd">按配件筛选</h2>
					<ul class="filter-list">
						<#list Session.schemeFilter["brand"] as brand>
						<li><a href="javascript:void(0);" name="${brand.id?c}" class="brand">${brand.name}</a></li>
						</#list>
						<#if selectedBrands??>
						<script>
							<#list selectedBrands as selected>
							parameters['brand'].push('${selected?c}');
							</#list>
						</script>
						</#if>
					</ul>
				</div>
				<div class="filter">
					<h2 class="filter-hd">按价格筛选</h2>
					<ul class="filter-list">
						<#list Session.schemeFilter["price"] as price>
						<li><a href="javascript:void(0);" name="${price.id?c}" class="price">${price.name}</a></li>
						</#list>
						<#if selectedPrices??>
						<script>
							<#list selectedPrices as selected>
							parameters['price'].push('${selected?c}');
							</#list>
						</script>
						</#if>
					</ul>
				</div>
				<div class="filter">
					<h2 class="filter-hd">按类别筛选</h2>
					<ul class="filter-list">
						<#list Session.schemeFilter["type"] as type>
						<li><a href="javascript:void(0);" name="${type.id?c}" class="type">${type.name}</a></li>
						</#list>
						<#if selectedTypes??>
						<script>
							<#list selectedTypes as selected>
							parameters['type'].push('${selected?c}');
							</#list>
						</script>
						</#if>
					</ul>
				</div>
			</div>
			<div class="main">
				<#assign pageNum = Session.schemePageNum />
				<#assign resultAmount = Session.schemeResultAmount />
				<script>
					pageAmount = Math.ceil(${resultAmount}/${PAGE_LENGTH});
					pageNum = ${pageNum};
					sortOrder = ${sortOrder};
				</script>
				<div class="sort-tab">
					<a href="javascript:void(0);" name="1">最新</a>
					<a href="javascript:void(0);" name="2">最热门</a>
					<a href="javascript:void(0);" name="3">最便宜</a>
					<a href="javascript:void(0);" name="4">最贵</a>
					<a href="javascript:void(0);" name="5">用户评分高</a>
					<a href="javascript:void(0);" name="6">专家评分高</a>
				</div>
				<div class="up-list">共找到${resultAmount}个方案</div>
				<#if Session.schemeResult?size == 0>
				<div class="empty">
					<div class="empty-msg">对不起，暂无符合筛选条件的方案！</div>
				</div>
				<#else>
				<ul class="list">
					<#assign indexInWindow = (pageNum-1)%PAGE_RETURN />
					<#if (Session.schemeResult?size > PAGE_LENGTH*(indexInWindow+1))>
						<#assign pageResult = Session.schemeResult[PAGE_LENGTH*indexInWindow..PAGE_LENGTH*(indexInWindow+1)-1] />
					<#else>
						<#assign pageResult = Session.schemeResult[PAGE_LENGTH*indexInWindow..] />
					</#if>
					<#list pageResult as scheme>
					<li class="list-item">
						<#assign id = scheme.id?c />
						<#assign name = scheme.schemeName />
						<#assign price = scheme.price />
						<#assign type = scheme.type.value />
						<#assign mainBoard = scheme.mainBoard.model />
						<#assign cpu = scheme.cpu.model />
						<#assign memory = scheme.memory.model />
						<#assign disk = scheme.disk.model />
						<#assign diskNum = scheme.diskNum />
						<#assign graphics = (scheme.graphics.model)!"无" />
						<#assign monitor = (scheme.monitor.model)!"无" />
						<#assign userId = scheme.userId?c />
						<#assign userName = scheme.userName />
						<#assign date = (scheme.time)?date />
						<#assign userScore = scheme.wscore />
						<#assign expertScore = scheme.zscore />
						<a target="_blank" href="${base}/schemeDetail.do?id=${id}" class="pic" title="${name}">
							<img width="80" height="60" src="${base}/pic/default.jpg" alt="${name}" />
							<img width="80" height="60" src="${base}/pic/default.jpg" alt="${name}" />
						</a>
						<div class="param">
							<h3><a target="_blank" href="${base}/schemeDetail.do?id=${id}" class="blue">${name}</a></h3>
							<ul>
								<li><span>总价：</span>&yen;<b>${price}</b></li>
								<li><span>类别：</span><a target="_blank" href="javascript:void(0);" class="blue">${type}</a></li>
								<li title="${mainBoard}"><span>主板：</span>${mainBoard}</li>
								<li title="${cpu}"><span>CPU：</span>${cpu}</li>
								<li title="${memory}"><span>内存：</span>${memory}</li>
								<li title="${diskNum}&nbsp;×&nbsp;${disk}"><span>硬盘：</span>${diskNum}&nbsp;×&nbsp;${disk}</li>
								<li title="${graphics}"><span>显卡：</span>${graphics}</li>
								<li title="${monitor}"><span>显示器：</span>${monitor}</li>
							</ul>
						</div>
						<div class="other">
							<p><a target="_blank" href="javascript:void(0);" class="user blue" title="${userName}">${userName}</a></p>
							<p>${date}</p>
							<p><a target="_blank" href="javascript:void(0);" class="green">用户评分：${userScore}</a></p>
							<p><a target="_blank" href="javascript:void(0);" class="green">专家评分：${expertScore}</a></p>
						</div>
					</li>
					</#list>
				</ul>
				</#if>
				<div class="page-bar"></div>
			</div>
		</div>
		<#include "/WEB-INF/ftl/user/footer.ftl" />
	</body>
</html>
